import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import Navigation from '@/components/Navigation'
import Footer from '@/components/Footer'
import BackToTop from '@/components/BackToTop'
import ThemeProvider from '@/components/ThemeProvider'
import NProgressProvider from '@/components/NProgressProvider'
import './globals.css'
import 'highlight.js/styles/github-dark.css'
import 'nprogress/nprogress.css'
import { AntdRegistry } from '@ant-design/nextjs-registry';

const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
  title: '我的个人博客',
  description: '分享我的想法和经验',
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="zh" suppressHydrationWarning>
      <body className={`${inter.className} bg-gray-100 dark:bg-gray-900 min-h-screen`}>
        <AntdRegistry>
          <ThemeProvider>
            <NProgressProvider />
            <Navigation />
            <div className="flex flex-col min-h-screen">
              <main className="flex-grow">
                {children}
              </main>
              <Footer />
            </div>
            <BackToTop />
          </ThemeProvider>
        </AntdRegistry>
      </body>
    </html>
  )
} 